* Merging Seyed's SE estimates into one file for polotting

*Run this block if stand alone. If commented out, it is because this will be run from _ricardo_master.do
*set more off, perm
*clear
*graph drop _all
*cd "C:/Users/tokay/Nouveau Dossier/Dropbox/HRR_InflDisaster/Ricardo"  // 

////////////////////////////////////////////////////////////////////////////////
import excel "$input/Joint_SE_US.xlsx", sheet("Sheet1")  clear
rename A date_ym
rename B joint_US_lo
rename C joint_US_hi
rename D joint_US_probb
format date_ym %tm
save "$input/step1", replace
clear
import excel "$input/Joint_SE_EZ.xlsx", sheet("Sheet1")  clear
rename A date_ym
rename B joint_EZ_lo
rename C joint_EZ_hi
rename D joint_EZ_probb
format date_ym %tm
save "$input/step2", replace
clear
import excel "$input/Pareto_SE_EZ.xlsx", sheet("Sheet1")  clear
rename A date_ym
rename B Pareto_EZ_lo
rename C Pareto_EZ_hi
rename D Pareto_EZ_probb
format date_ym %tm
save "$input/step3", replace
clear
import excel "$input/Pareto_SE_US.xlsx", sheet("Sheet1")  clear
rename A date_ym
rename B Pareto_US_lo
rename C Pareto_US_hi
rename D Pareto_US_probb
format date_ym %tm
merge 1:1 date_ym using "$input/step3"
drop _merge
merge 1:1 date_ym using "$input/step1"
drop _merge
merge 1:1 date_ym using "$input/step2"
drop _merge

save "$input/dataSEs", replace 
